#ifndef HAL_CAN_H
#define HAL_CAN_H

#include "HalCtype.h"

typedef enum
{
    HAL_CAN_PORT_1 = 0,
    HAL_CAN_PORT_2,
    HAL_CAN_PORT_COUNT,
}HalCANPort_t;

typedef void (*HalCANRecvData_cb)(HalCANPort_t port, uint32_t id, uint8_t *data, uint8_t dlen);

int HalCANSendWaitAck(HalCANPort_t port, uint32_t id, uint8_t *data, uint8_t len, uint8_t *recvBuff);
int HalCANSend(HalCANPort_t port, uint32_t id, uint8_t *data, uint8_t len);
int HalCANInitialize(HalCANRecvData_cb recvCallback);

#endif
